/*
 * BinaryStreamReader.hpp
 *
 *  Created on: Mar 20, 2014
 *      Author: knuke
 */

#ifndef BINARYSTREAMREADER_HPP_
#define BINARYSTREAMREADER_HPP_

#include <string>
#include <vector>
#include "Types.hpp"

namespace gengine
{

  class BinaryStreamReader
  {
  public:
    BinaryStreamReader();
    BinaryStreamReader(std::string file_name);
    virtual ~BinaryStreamReader() throw();

    void fromFile(std::string file_name);

    int nextInt(short bytes);
    std::vector<int> nextIntArrray(int len, short bytes_per_int);
    float nextFloat();
    std::vector<float> nextFloatArrray(int len);

  private:
    std::vector<uchar> data_;
    uint pos_;
  };

} /* namespace gconverter */

#endif /* BINARYSTREAMREADER_HPP_ */
